#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
@Project ：back 
@File    ：guest_book_proto.py
@IDE     ：PyCharm 
@Author  ：七分是你
@Date    ：2024/6/30 下午7:09 
@explain : 
"""
from typing import Optional

from pydantic import BaseModel, Field


class GuestBoolRequestParam(BaseModel):
    """查询请求参数"""
    id: Optional[int] = Field(default=None, description="ID", examples=["1"])
    uid: Optional[int] = Field(default=None, description="用户ID", examples=["1"])
    parent_id: Optional[int] = Field(default=None, description="父级ID", examples=["1"])
    title: Optional[str] = Field(default=None, description="标题", examples=["test"])


class GuestBookRequestData(BaseModel):
    id: Optional[int] = Field(default=None, description="ID", examples=["1"])
    uid: Optional[int] = Field(default=None, description="ID", examples=["1"])
    parent_id: Optional[int] = Field(default=None, description="父级ID", examples=["1"])
    content: Optional[str] = Field(default=None, description="内容", examples=["1"])
    suggest: Optional[str] = Field(default=None, description="建议目的", examples=["test"])
    types: Optional[str] = Field(default=None, description="留言类型", examples=["1"])
    entryname: Optional[str] = Field(default=None, description="项目名称", examples=["1"])
    constructionunitname: Optional[str] = Field(default=None, description="施工单位名称", examples=["1"])
    zbdwname: Optional[str] = Field(default=None, description="总包单位名称", examples=["test"])
    phonenumber: Optional[str] = Field(default=None, description="手机号码", examples=["test"])
    title: Optional[str] = Field(default=None, description="标题", examples=["test"])
    lock: Optional[int] = Field(default=0, description="是否锁定0正常1锁定", examples=["test"])
    addtime: Optional[int] = Field(default=0, description="是否锁定0正常1锁定", examples=["test"])


class GuestBookReplyData(BaseModel):
    content: Optional[str] = Field(default=None, description="内容", examples=["1"])


class GuestBookDetailProto(BaseModel):
    id: Optional[int] = Field(default=None, description="id", examples=["1"])
    uid: Optional[int] = Field(default=None, description="uid", examples=["1"])
    parent_id: Optional[int] = Field(default=None, description="父级ID", examples=["1"])
    content: Optional[str] = Field(default=None, description="内容", examples=["1"])
    suggest: Optional[str] = Field(default=None, description="建议目的", examples=["test"])
    types: Optional[str] = Field(default=None, description="留言类型", examples=["1"])
    entryname: Optional[str] = Field(default=None, description="项目名称", examples=["1"])
    constructionunitname: Optional[str] = Field(default=None, description="施工单位名称", examples=["1"])
    zbdwname: Optional[str] = Field(default=None, description="总包单位名称", examples=["test"])
    phonenumber: Optional[str] = Field(default=None, description="手机号码", examples=["test"])
    title: Optional[str] = Field(default=None, description="标题", examples=["test"])
    lock: Optional[int] = Field(default=0, description="是否锁定0正常1锁定", examples=["test"])
    addtime: Optional[int] = Field(default=0, description="添加时间", examples=["test"])
    reply_data: Optional[GuestBookReplyData] = Field(default=None, description="回复内容", examples=["test"])
